    var sysetmsock = null;
    var dockersock = null;
    var systemstatus = "ws://localhost:5000/systemstatus"; 
    var dockerstatus = "ws://localhost:5000/dockerstatus"; 

    window.onload = function() {

        systemsock = new WebSocket(systemstatus);
        dockersock = new WebSocket(dockerstatus);

        systemsock.binaryType = "arraybuffer"
        dockersock.binaryType = "arraybuffer"

        systemsock.onopen = function() {
            console.log("connected to " + systemstatus);
        }

        systemsock.onclose = function(s) {
            console.log("connection closed (" + s.code + ")");
        }

        systemsock.onmessage = function(s) {
            var systemObj = JSON.parse(JSON.parse(s.data));
            // console.log(systemObj)
            // console.log(s)
            updateSystemFormWithData(systemObj)
        }
        dockersock.onmessage = function(d) {
            var dockerObj = JSON.parse(JSON.parse(d.data));
            console.log(dockerObj)
            console.log(d)
            updateDockerFormWithData(dockerObj)
       }


    };

    function send() {
        var msg = document.getElementById('message').value;
        sock.send(msg);
    };
    

    function updateSystemFormWithData(obj) {
      
            document.getElementById('systemForm').innerHTML = renderSystemTable(obj)

          }

    function updateDockerFormWithData(obj) {
      
            document.getElementById('dockerForm').innerHTML = renderDockerTable(obj)

          }